.cart-container {
  flex: 1;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}
.empty-cart {
  padding-top: 300rpx;
  font-size: 24rpx;
  color: var(--main-color);
  align-items: center;
  image {
    width: 165rpx;
    height: 165rpx;
    margin-bottom: 30rpx;
  }
}
.cart-list {
  padding: 30rpx;
  box-sizing: border-box;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 60rpx; // 留出底部按钮的空间
  .cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 100rpx;
    position: relative;
    .cart-item-left {
      display: flex;
      align-items: center;
      justify-content: space-between;
      .select {
        width: 40rpx;
        height: 260rpx;
        display: flex;
        align-items: center;
        justify-content: center;

        .select-icon {
          width: 28rpx;
          height: 28rpx;
          border-radius: 50%;
          background: transparent;
          border: 2rpx solid var(--main-color);
        }

        .expire-icon {
          border: 2rpx solid #979797;
          background-color: #979797;
        }
      }
      .cart-item-left-img {
        width: 260rpx;
        height: 260rpx;
        margin: 0 14rpx;
        font-size: 0;
        position: relative;
        image {
          width: 100%;
          height: 100%;
        }
      }
      .expire-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(151, 151, 151, 0.6);
        color: #fff;
        font-size: 28rpx;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
      }
    }
    &-right {
      flex: 1;
      height: 260rpx;
      color: #545454;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      .name {
        font-size: 28rpx;
        color: #333;
        font-weight: bold;
        margin-bottom: 28rpx;
        display: flex;
        justify-content: space-between;
        text {
          flex: 1;
          margin-right: 20rpx;
          // 两行
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        .x {
          width: 28rpx;
          height: 28rpx;
          margin-top: 4rpx;
          text-align: right;
          image {
            width: 100%;
            height: 100%;
          }
        }
      }
      .desc {
        font-size: 22rpx;
      }
      .opt {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .opt-rebuy {
          width: 174rpx;
          height: 46rpx;
          background: var(--main-color);
          color: #fff;
          font-size: 22rpx;
          display: flex;
          align-items: center;
          justify-content: center;
          border-radius: 2rpx;
        }
        .opt-price {
          font-size: 28rpx;
          color: #333;
          font-weight: bold;
        }
        .opt-num {
          display: flex;
          align-items: center;
          justify-content: space-between;
          .opt-num-minus,
          .opt-num-add {
            width: 46rpx;
            height: 46rpx;
            border: 2rpx solid #979797;
            text-align: center;
            line-height: 46rpx;
          }
          .opt-num-num {
            width: 80rpx;
            height: 46rpx;
            line-height: 46rpx;
            font-size: 26rpx;
            text-align: center;
            border-top: 2rpx solid #979797;
            border-bottom: 2rpx solid #979797;
          }
        }
      }
    }
  }
}
.active {
  background-color: var(--main-color) !important;
}
.cart-bottom {
  position: absolute;
  padding: 0 30rpx;
  box-sizing: border-box;
  bottom: 0;
  left: 0;
  right: 0;
  height: 110rpx;
  background-color: #e7e7e7;
  box-shadow: 0 -10rpx 10rpx rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 26rpx;
  color: #545454;

  .left {
    display: flex;
    align-items: center;
    justify-content: center;
    .all-select {
      width: 28rpx;
      height: 28rpx;
      border-radius: 50%;
      border: 2rpx solid var(--main-color);
      margin-right: 26rpx;
    }
  }
  .right {
    display: flex;
    align-items: center;
    justify-content: center;
    .total-price {
      font-weight: bold;
    }
    .settlement {
      background-color: #979797;
      color: #fff;
      width: 156rpx;
      height: 70rpx;
      box-sizing: border-box;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 2rpx;
      margin-left: 26rpx;
      font-size: 23rpx;
      &.active {
        background-color: var(--main-color);
        color: #fff;
      }
    }
  }
}
